package com.bootdo.imgtext.check;

import com.bootdo.imgtext.check.impl.CnnctyImpl;
import com.bootdo.imgtext.check.impl.GwnImpl;
import com.bootdo.imgtext.check.impl.KepuImpl;
import com.bootdo.imgtext.check.impl.KpChinaImpl;
import com.bootdo.imgtext.check.impl.PeopleImpl;
import com.bootdo.imgtext.check.impl.XinhuaImpl;

public class CheckFactory {

	public static CheckService getCheckService(String url) {
		if (url.contains("xinhuanet.com")) {
			return new XinhuaImpl(url);
		}else if (url.contains("zhihui.kepuchina.cn")) {
			return new KpChinaImpl(url);
		}else if (url.contains("www.kepu.net.cn")) {
			return new KepuImpl(url);
		}else if (url.contains("www.cnncty.com")) {
			return new CnnctyImpl(url);
		}else if (url.contains("people.com.cn") || url.contains("people.cn")) {
			return new PeopleImpl(url);
		}else if (url.contains("gmw.cn")) {
			return new GwnImpl(url);
		}
		return null;
	}
}
